﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace vciplib0
{
    public class PRM_SegFrameInsp
    {
        [Category("1.检测参数"), DisplayName("b.崩边阈值"), Browsable(true), Description("崩边灰阶阈值,默认值25，[15-100] 数值越高,崩边卡控越严格")]
        public int PRM_ChippingThreshold { get; set; } = 25;

        [Category("1.检测参数"), DisplayName("c.墨点侦测"), Browsable(true), Description("[重要参数] 是否开启墨点侦测功能 True: 开启  False:关闭")]
        public bool PRM_InkDetect { get; set; } = false;

        #region Bump 相关参数

        [Category("1.检测参数"), DisplayName("c.Bump检测"), Browsable(true), Description("[重要参数] 是否开启Bump检测功能 True: 开启  False:关闭")]
        public bool PRM_BumpEnable { get; set; } = false;


        [Category("1.检测参数"), DisplayName("Bump区域"), Description("Bump区域集合"), Browsable(false)]
        public List<PRM_BumpRegion> BumpROIs { get; set; } = new List<PRM_BumpRegion>();

        [CategoryAttribute("4.检测参数 Bump"), DisplayName("a.Bump[亮点] 灰阶差 "), Description("灰阶差大于参数，判Bump亮点  设置范围[40 - 255] ,默认值 85"), Browsable(true)]
        public Double Bump_BrightDalta { get; set; } = 85;

        [CategoryAttribute("4.检测参数 Bump"), DisplayName("b.Bump[暗点] 灰阶差"), Description("灰阶差大于参数，判Bump暗点  设置范围[30 - 255] ,默认值 45"), Browsable(false)]
        public Double Bump_DarkDalta { get; set; } = 45;

        [CategoryAttribute("4.检测参数 Bump"), DisplayName("b.Bump Defect面积阈值"), Description("Bump最小Defect面积，单位um. 设置范围[100 - 900] 默认值: 140"), Browsable(true)]
        public Double Bump_MinDefectArea { get; set; } = 140;


        [CategoryAttribute("4.检测参数 Bump"), DisplayName("d.Bump区灰阶阈值定义"), Description("Bump区灰阶阈值 设置范围[15 - 55] ,默认值 35 灰阶低于参数，则归为Bump区"), Browsable(false)]
        public Double Bump_threshold { get; set; } = 35;

        #endregion


        [Category("1.检测参数"), DisplayName("Chip定位认识"), Description("Chip定位参数集合"), Browsable(false)]
        public List<MatchingParam> MatchModels { get; set; } //动态添加 定位认识点数量，至少2个，建议设置4个点

        [Category("1.检测参数"), DisplayName("Chip定位"), Description("True:使用第一个分段的仿射变换数据，不再做定位  False:功能禁用"), Browsable(false)]
        public bool UseFirstMatchHomat { get; set; } = false;

        [Category("1.检测参数"), DisplayName("检测区域"), Description("检测区域集合"), Browsable(false)]
        public List<PRM_RegionDetect> DetectROIs { get; set; } = new List<PRM_RegionDetect>();
 
        [CategoryAttribute("2.检测参数"), DisplayName("0.Sealing崩边检测区"), Description("sealing边缘,用于崩边检测 定义完整的 DriverIC 区域,不包含切割道"), Browsable(false), ReadOnly(true)]
        public PRM_ROI R_RegionChipDie { get; set; } = new PRM_ROI(4, 0);



        #region 崩边，参数 
        [CategoryAttribute("2.检测参数"), DisplayName("1.崩边距离定义"), Description("崩边区距离 DirverIC线路最小距离，切割边距离线路小于此设定值判定崩边,单位um"), Browsable(false)]
        public double P_SeallingExtendSize { get; set; } = 10.0;

        [Category("3.检测功能启用"), DisplayName("0.晶粒 [正崩] 检测"), Description("False：关闭崩边检测，True：开启崩边检测"), Browsable(false)]
        public bool F_ChippingEnable { get; set; } = true;


        [Category("3.检测功能启用"), DisplayName("0.晶粒 [外崩] 检测"), Description("False：关闭 检测，True：开启 检测"), Browsable(false)]
        public bool F_OutChippingEnable { get; set; } = false;

        #endregion

        [Category("3.检测功能启用"), DisplayName("1.Golden模式"), Description("False：禁用预制模版，True：启用预制模版"), Browsable(false)]
        public bool F_IsUseDefinedGoldenModel { get; set; } = false;
    }

}
